package com.itheima_03;

import java.math.BigDecimal;

import static java.math.BigDecimal.ROUND_HALF_UP;

public class Test01 {
    public static void main(String[] args) {
        BigDecimal big = new BigDecimal(10.0);
        BigDecimal big1 = new BigDecimal("2.2");
        BigDecimal big2 = new BigDecimal("3.3");
        BigDecimal add = big1.add(big2);
        System.out.println(add);
        BigDecimal sub = big2.subtract(big1);
        System.out.println(sub);
        BigDecimal mul = big1.multiply(big2);
        System.out.println(mul);
        BigDecimal div = big1.divide(big2,2,BigDecimal.ROUND_HALF_UP);
        System.out.println(div);

    }
}
